<!--{template admin/header}-->
<script type="text/javascript">
function slpd(){
var sl = $('#sl').val();
if(sl>=3){
alert('最多只能上传3张图，请先删除！');
return false;
}
return true;
}
</script>
<form action="admin.php?mod=brandslide&code=add" method="post" onsubmit="return slpd();" enctype="multipart/form-data">
  <table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
    <tr class="header">
      <td colspan="3"> 添加品牌幻灯片 </td>
    </tr>
    <tr>
      <td class="altbg1" width="119">上传图片: </td>
      <td width="300" class="altbg"><input name="pic" type="file" id="pic"  size="40">
	  
	  </td>
  </tr>
	 <tr>
      <td class="altbg1" width="119">排序: </td>
      <td width="300" class="altbg">
	  <input type="text" name="sord" size="5" />
	  </td>
 </tr>
	 <tr>
     <td width="942" class="altbg" colspan="2" align="center"><button name="do" value='' type="submit" class="button">上传</button></td>
    </tr>
  </table>
  <input type="hidden" id="sl" name="sl" value="{$sl}" size="5" /><input type="hidden" id="sl" name="sl" value="{$sl}" size="5" />
</form>
<form method="post" name="settings" action="admin.php?mod=brandslide&code=add">
   <a name="品牌幻灯列表"></a>
	<table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">
		<tr class="header"> 
           <td>图片地址和链接地址</td>
			<td>排序</td> 
			<td>操作</td>          
		</tr>
      	<!--{loop $brandslide_list $k $val}-->
		<tr>
         <td valign="top">{$k}）请输入图片地址：<input type="text" name="brandpic1" value="{$val[pic]}" size="50" />图片大小以680x220为最佳；<br />
			</td>
            <td valign="top"><input type="text" name="brandorder1" value="{$val[sord]}" size="5" /></td> 
			 <td valign="top"><A href="admin.php?mod=brandslide&code=delete&amp;ids={$val[id]}">删除</A>&nbsp;</td> 
		</tr>
		<tr>
			      <td valign="top" colspan="3"><img src="images/brand/{$val[pic]}" height="220" border="0" /></td>
           
		</tr>
		<!--{/loop}-->     
  </table>
	
    
</form>
<br />
